﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace HengTong.Model.Db.Hr.Bill;

/// <summary>
/// 加班申请
/// </summary>
[Display(Name = "加班申请", Description = "员工加班申请表单", GroupName = "日常业务表单")]
public class SysDailyOvertimeRequestBill : BaseBill
{
    [Required]
    [Display(Name = "员工ID", Description = "关联员工主键", GroupName = "员工信息")]
    public Guid? PersonId { get; set; }

    [Display(Name = "员工", Description = "关联的员工实体", GroupName = "员工信息")]
    public SysPerson Person { get; set; }

    [Required, StringLength(128)]
    [Display(Name = "员工工号", Description = "员工工号", GroupName = "加班申请信息")]
    public string StaffNo { get; set; }

    [Required, StringLength(128)]
    [Display(Name = "员工姓名", Description = "员工姓名", GroupName = "加班申请信息")]
    public string Name { get; set; }

    [Required]
    [Display(Name = "排班记录ID", Description = "关联排班记录主键", GroupName = "加班申请信息")]
    public Guid? RecordId { get; set; }

    [Required]
    [Display(Name = "开始时间", Description = "开始时间", GroupName = "加班申请信息")]
    public DateTime? StartTime { get; set; }

    [Required]
    [Display(Name = "结束时间", Description = "结束时间", GroupName = "加班申请信息")]
    public DateTime? EndTime { get; set; }

    [Required, Column(TypeName = "decimal(8,2)")]
    [Display(Name = "加班时长(小时)", Description = "加班时长", GroupName = "加班申请信息")]
    public decimal? OvertimeHours { get; set; }

    [Required]
    [Display(Name = "加班补偿方式", Description = "等时调休/薪资补助", GroupName = "加班申请信息")]
    public OvertimeCompensationType? CompensationType { get; set; }

    [Column(TypeName = "decimal(8,2)")]
    [Display(Name = "剩余可调休时长(小时)", Description = "等时调休剩余可用时长", GroupName = "加班申请信息")]
    public decimal? RemainingCompOffHours { get; set; }

    [Required, StringLength(256)]
    [Display(Name = "加班事由", Description = "加班事由", GroupName = "加班申请信息")]
    public string Reason { get; set; }
}